<template>
	<view class="wrap">
		<view class="list-wrap" v-for="(item,index) in dataObj" :key="index">
			<view class="left">
				<view class="dot">
					
				</view>
				<view class="info">
					<view class="top">{{item.remark}}</view>
					<view class="time">
						{{item.create_time}}
					</view>
				</view>
			</view>
			<view class="right">
				{{item.number}}
			</view>
		</view>
		<uni-load-more  :status="more">
		</uni-load-more>
	</view>
</template>

<script>
	export default {

		data() {
			return {
				more:'loading',
				nowpage:1,
				type:'',
				dataObj:[]
			}
		},
		onShow(){
			//this.getData()
		},
		onLoad(options) {
			this.type=options.type
			uni.setNavigationBarTitle({
			    title: options.type=='USDT'?'USD':options.type
			});
			this.getData()
		},
		onPullDownRefresh:function(){
			this.more='more'
			this.dataObj=[]
			this.nowpage=1
			this.getData()
		 },
		onReachBottom() {
			if(this.more=='nomore'){
				return
			}
			this.getData()	
		},
		methods: {
	

			getData(){
				let that=this
				
				that.apipost('/api/assets/withdrawal_record',{
					name:that.type,
					page:that.nowpage
				},true).then(res => {
					if(res.Code==10200){
						let data=res.Data
						that.dataObj=that.dataObj.concat(data)
						++that.nowpage
						uni.stopPullDownRefresh()
						if(data.length<15){
							that.more='nomore'
						}
						
					}
					
				}).catch(err=>{
					console.log(err)
				});
			}
			
			
		}
	}
</script>

<style>
	.time{
		color:#b3cef9;
		margin-top:10rpx;
	}
	
	.list-wrap .dot{
		background:#fff;
		height:22rpx;
		border-radius:50%;
		margin-right:28rpx;
		width:22rpx;
	}
	.list-wrap .left{
		display:flex;
		align-items: center;
	}
	.list-wrap{
		margin-top:20rpx;
		height:136rpx;
		display:flex;
		align-items: center;
		justify-content: space-between;
		background:linear-gradient(to bottom,#4466ee,#7791ff);
		border-radius:10rpx;
		color:#fff;
		padding: 0 40rpx 0 18rpx; 
	}
	page{
		background:#f4f6f5;
	}
	.wrap{
		padding:24rpx;
	}
</style>
